export interface IVideo {
	id: string;
	fullScreen: boolean;
	muteVol: boolean;
	streamMode: 'video' | 'audio';
	pictureInPicture: boolean;
	micMute: boolean;
}

class Video {
	public fullScreen: boolean = false;
	public pictureInPicture: boolean = false;
	public streamMode: 'video' | 'audio' = 'video';
	public muteVol: boolean = false;
	public id: string = '';
	public micMute: boolean = false;

	constructor(video?: IVideo) {
		this.setVideoInfo(video);
	}

	public setVideoInfo(video?: IVideo) {
		if (!video) return;
		const { fullScreen = false, id = '', streamMode = 'video', muteVol = false, pictureInPicture = false, micMute = false } = video;
		this.id = id;
		this.muteVol = muteVol;
		this.streamMode = streamMode;
		this.fullScreen = fullScreen;
		this.micMute = micMute;
		this.pictureInPicture = pictureInPicture;
	}
}

export default Video;
